<template>
  <el-card class="box-card">
    <el-form :inline="true" :model="searchData" class="demo-form-inline">
    <el-form-item label="名字">
      <el-input v-model="searchData.name" placeholder="请输入名字" />
    </el-form-item>
    <el-form-item label="地址">
      <el-input v-model="searchData.address" placeholder="请输入地址" />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
  <el-table :data="data.tableData" style="width: 100%">
    <el-table-column prop="id" label="id"/>
    <el-table-column prop="name" label="Name" />
    <el-table-column prop="age" label="age" />
    <el-table-column prop="address" label="address" />
  </el-table>
  <el-pagination class='page' small layout="prev, pager, next" :total="data.tableData.length" />
  </el-card>
</template>

<script setup lang='ts'>
import { ref, reactive } from 'vue'
const data = reactive({
    tableData:[
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"},
        {name:"罗林兰",age:12,id:1,address:"成都市青羊区光华锦苑3"}
    ],
    searchData:{}
})
const  searchData = reactive({
  name:"",
  address:""
})
const onSubmit = ()=>{
    console.log("搜索")
}
</script>
<style lang='scss'  scoped>
.page{
  display: flex;
  justify-content: center;
  margin:20px auto;
  text-align: center;
}
</style>